package com.zsh.wanandroid.ui.adapter;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zsh.wanandroid.R;
import com.zsh.wanandroid.base.CommonAdapter;
import com.zsh.wanandroid.bean.ScoreResult;
import com.zsh.wanandroid.ui.view.ViewHolder;

import java.util.List;

/**
 * @author zsh
 * @date 2020/3/12.
 * 功能：积分列表adapter
 */

public class ScoreAdapter extends BaseQuickAdapter<ScoreResult.Data.Datas, BaseViewHolder> {


    public ScoreAdapter(@LayoutRes int layoutResId, @Nullable List<ScoreResult.Data.Datas> data) {
        super(layoutResId, data);
    }

    public ScoreAdapter(@Nullable List<ScoreResult.Data.Datas> data) {
        super(data);
    }

    public ScoreAdapter(@LayoutRes int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, ScoreResult.Data.Datas item) {
        helper.setText(R.id.tvReason, item.getReason());
        helper.setText(R.id.tvDesc, item.getDesc());
        helper.setText(R.id.tvCoinCount, item.getCoinCount()+"");
    }
}
